package com.example.order.service;

import com.example.model.domain.entity.order.OrderInfo;
import com.example.model.domain.entity.order.PaymentInfo;

import java.util.Map;

/**
 * @Author juzipi
 * @Date 2021/7/26 8:34
 * @Info
 */
public interface PaymentInfoService {


    /**
     * 查询PaymentInfo
     * @param orderId 订单id
     * @param status 支付方式
     * @return
     */
    PaymentInfo getPaymentInfoByOrderIdAndPaymentType(Long orderId, Integer status);

    /**
     * 添加支付记录
     * @param orderInfo
     * @param paymentType
     * @return
     */
    Integer insertPaymentInfo(OrderInfo orderInfo, Integer paymentType);


    /**
     * 更新订单状态
     * @param outTradeNo
     * @param paymentType
     * @param resultMap
     * @return
     */
    Integer updatePaymentType(String outTradeNo, Integer paymentType, Map<String, String> resultMap);
}
